<?php

namespace app\model\game;

use app\base\BaseModel;

/**
 * 模型-GameTypeModel
 * Class GameType
 * @package app\model
 */
class GameTypeModel extends BaseModel
{
    protected $name = 'game_type';

    /**
     * 获取卡片类型
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function getTypeList()
    {
        $list = self::where('type', '>', 0)->select();
        $arr_list = [];
        foreach ($list as $value) {
            $arr_list[intval($value['type'])] = $value;
        }
        return $arr_list;
    }
}